// import count from '@feidao/web/atom/nodejs/db/count';
import query from '@dfeidao/atom-nodejs/db/query';
// import { IBaseTable } from '@feidao/web/atom/nodejs/db/interfaces';



interface Message {
	productid: string;
	menu_no: string;
}

export default async function atom(msg: Message, action_id: string, session_id: string) {

	const systemid = '12';
	const { exec, prepare } = query(action_id, session_id, systemid);
	const productid = msg.productid;
	const parent_no = msg.menu_no;
	prepare('pub_menu', ['menu_no', 'menu_name', 'priority', 'systemid', 'parent_no', 'formid', 'client_type', 'description', 'priority', 'icon'], { productid, parent_no }, 200, 1, [], []);
	const [data] = await exec();
	return data;
}
